#include <bits/stdc++.h>
using namespace std;
int a, b;
int A(int a, int b){
    if (a == 0) return b + 1;
    if (b == 0) return A(a - 1, 1);
    return A(a - 1, A(a, b - 1)); 
}
int main(){
    cin >> a >> b;
    cout << A(a, b);
}
